package com.fz.mapper;

import com.fz.entity.Student;
import com.fz.entity.Tom;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by webrx on 2017/6/13.
 */
public interface TomMapper {
    @Insert("insert into tom values(null,#{name})")
    public int save(Tom tom);
    /*@Insert("insert into student values(null,#{name},#{address})")
    public int save(Student student);*/
    @Delete("delete from tom where id=#{id}")
    public int deleteById(int id);

    @Select("select * from tom ")
    public List<Tom> query();
}
